package ai.people.platform.archives.mapper;

import ai.people.netmon.framework.domain.archives.entity.WorkOrder;
import ai.people.netmon.framework.domain.archives.request.WorkOrderListRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhenglin
 * @since 2022-05-31
 */
@Mapper
public interface WorkOrderMapper extends BaseMapper<WorkOrder> {

    /**
     * 自定义分页查询
     *
     * @param page    页面
     * @param request 请求
     * @return {@link List}<{@link WorkOrder}>
     */
    Page<WorkOrder> pageCustom(Page<WorkOrder> page, WorkOrderListRequest request);

    /**
     * 自定义分页查询
     *
     * @param page    页面
     * @param request 请求
     * @param userId  用户id
     * @return {@link Page}<{@link WorkOrder}>
     */
    Page<WorkOrder> pageCustomUser(Page<WorkOrder> page, WorkOrderListRequest request, Long userId);
}
